// Created from GenerationTemplate
// For Decisions HL7 Engine
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Reflection;
using DecisionsFramework.Design.Properties;
using Decisions.HL7.Generated.AbstractMessage;
using Decisions.HL7.DataTypes;
using ST = System.String;
using SI = System.String;
using TX = System.String;
using FT = System.String;
using IS = System.String;
using ID = System.String;
using SNM = System.String;

namespace Decisions.HL7.Message
{
    [DataContract]
	public class CSR : AbstractSegment
    {

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("1 Sponsor Study ID",1)]
  	    [HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.True,"EI")]
	    public EI SponsorStudyID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("2 Alternate Study ID",2)]
  	    [HL7Field(HL7Version.v23, 2, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v231, 2, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v24, 2, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v25, 2, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v251, 2, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v26, 2, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v27, 2, HL7Repeat.False, HL7Required.True,"EI")]
	    public EI AlternateStudyID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("3 Institution Registering the Patient",3)]
  	    [HL7Field(HL7Version.v23, 3, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 3, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 3, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 3, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 3, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 3, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 3, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE InstitutionRegisteringthePatient {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("4 Sponsor Patient ID",4)]
  	    [HL7Field(HL7Version.v23, 4, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v231, 4, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v24, 4, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v25, 4, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v251, 4, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v26, 4, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v27, 4, HL7Repeat.False, HL7Required.True,"CX")]
	    public CX SponsorPatientID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("5 Alternate Patient ID",5)]
  	    [HL7Field(HL7Version.v23, 5, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v231, 5, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v24, 5, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v25, 5, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v251, 5, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v26, 5, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v27, 5, HL7Repeat.False, HL7Required.True,"CX")]
	    public CX AlternatePatientID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("6 Date/Time of Patient Study Registration",6)]
  	    [HL7Field(HL7Version.v23, 6, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 6, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 6, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 6, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 6, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 6, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 6, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM DateTimeofPatientStudyRegistration {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("7 Person Performing Study Registration",7)]
  	    [HL7Field(HL7Version.v23, 7, HL7Repeat.False, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v231, 7, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v24, 7, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v25, 7, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v251, 7, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v26, 7, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v27, 7, HL7Repeat.True, HL7Required.True,"XCN")]
	    public XCN[] PersonPerformingStudyRegistration {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("8 Study Authorizing Provider",8)]
  	    [HL7Field(HL7Version.v23, 8, HL7Repeat.False, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v231, 8, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v24, 8, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v25, 8, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v251, 8, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v26, 8, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v27, 8, HL7Repeat.True, HL7Required.True,"XCN")]
	    public XCN[] StudyAuthorizingProvider {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("9 Date/Time Patient Study Consent Signed",9)]
  	    [HL7Field(HL7Version.v23, 9, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 9, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 9, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 9, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 9, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 9, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 9, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM DateTimePatientStudyConsentSigned {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("10 Patient Study Eligibility Status",10)]
  	    [HL7Field(HL7Version.v23, 10, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 10, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 10, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 10, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 10, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 10, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 10, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE PatientStudyEligibilityStatus {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("11 Study Randomization Date/time",11)]
  	    [HL7Field(HL7Version.v23, 11, HL7Repeat.True, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 11, HL7Repeat.True, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 11, HL7Repeat.True, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 11, HL7Repeat.True, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 11, HL7Repeat.True, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 11, HL7Repeat.True, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 11, HL7Repeat.True, HL7Required.True,"DTM")]
	    public DTM[] StudyRandomizationDatetime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("12 Study Randomized Arm",12)]
  	    [HL7Field(HL7Version.v23, 12, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 12, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 12, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 12, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 12, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 12, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 12, HL7Repeat.True, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE[] StudyRandomizedArm {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("13 Stratum for Study Randomization",13)]
  	    [HL7Field(HL7Version.v23, 13, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 13, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 13, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 13, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 13, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 13, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 13, HL7Repeat.True, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE[] StratumforStudyRandomization {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("14 Patient Evaluability Status",14)]
  	    [HL7Field(HL7Version.v23, 14, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 14, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 14, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 14, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 14, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 14, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 14, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE PatientEvaluabilityStatus {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("15 Date/Time Ended Study",15)]
  	    [HL7Field(HL7Version.v23, 15, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 15, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 15, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 15, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 15, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 15, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 15, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM DateTimeEndedStudy {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("16 Reason Ended Study",16)]
  	    [HL7Field(HL7Version.v23, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 16, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 16, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE ReasonEndedStudy {get;set;}


	    [DataMember]
        [PropertyClassification("AdditionalValue1", 17)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue1 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue2", 18)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue2 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue3", 19)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue3 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue4", 20)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue4 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue5", 21)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue5 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue6", 22)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue6 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue7", 23)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue7 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue8", 24)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue8 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue9", 25)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue9 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue10", 26)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue10 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue11", 27)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue11 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue12", 28)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue12 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue13", 29)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue13 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue14", 30)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue14 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue15", 31)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue15 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue16", 32)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue16 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue17", 33)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue17 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue18", 34)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue18 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue19", 35)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue19 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue20", 36)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue20 { get; set; }

	

		internal override void ConsumeTextSegment(string segmentTextData, HL7ParserOptions options)
		{
			string[] segmentTextParts = segmentTextData.Split(new char[] { options.FieldSep }, StringSplitOptions.None);
			SponsorStudyID = (EI)ParseTextAtPositionIntoData(segmentTextParts, 1, options, typeof(EI), "CSR.1");
			AlternateStudyID = (EI)ParseTextAtPositionIntoData(segmentTextParts, 2, options, typeof(EI), "CSR.2");
			InstitutionRegisteringthePatient = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 3, options, typeof(CWE), "CSR.3");
			SponsorPatientID = (CX)ParseTextAtPositionIntoData(segmentTextParts, 4, options, typeof(CX), "CSR.4");
			AlternatePatientID = (CX)ParseTextAtPositionIntoData(segmentTextParts, 5, options, typeof(CX), "CSR.5");
			DateTimeofPatientStudyRegistration = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 6, options, typeof(DTM), "CSR.6");
	    	PersonPerformingStudyRegistration = (XCN[])ParseTextAtPositionIntoDataArray<XCN>(segmentTextParts, 7, options, "CSR.7");
	    	StudyAuthorizingProvider = (XCN[])ParseTextAtPositionIntoDataArray<XCN>(segmentTextParts, 8, options, "CSR.8");
			DateTimePatientStudyConsentSigned = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 9, options, typeof(DTM), "CSR.9");
			PatientStudyEligibilityStatus = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 10, options, typeof(CWE), "CSR.10");
	    	StudyRandomizationDatetime = (DTM[])ParseTextAtPositionIntoDataArray<DTM>(segmentTextParts, 11, options, "CSR.11");
	    	StudyRandomizedArm = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 12, options, "CSR.12");
	    	StratumforStudyRandomization = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 13, options, "CSR.13");
			PatientEvaluabilityStatus = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 14, options, typeof(CWE), "CSR.14");
			DateTimeEndedStudy = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 15, options, typeof(DTM), "CSR.15");
			ReasonEndedStudy = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 16, options, typeof(CWE), "CSR.16");
		}

		public string GetER7(HL7ParserOptions options) {
			List<string> segmentParts = new List<string>();
			segmentParts.Add("CSR");
			segmentParts.Add(GetER7TextForSegmentPart(SponsorStudyID, options));
			segmentParts.Add(GetER7TextForSegmentPart(AlternateStudyID, options));
			segmentParts.Add(GetER7TextForSegmentPart(InstitutionRegisteringthePatient, options));
			segmentParts.Add(GetER7TextForSegmentPart(SponsorPatientID, options));
			segmentParts.Add(GetER7TextForSegmentPart(AlternatePatientID, options));
			segmentParts.Add(GetER7TextForSegmentPart(DateTimeofPatientStudyRegistration, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PersonPerformingStudyRegistration, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(StudyAuthorizingProvider, options));
			segmentParts.Add(GetER7TextForSegmentPart(DateTimePatientStudyConsentSigned, options));
			segmentParts.Add(GetER7TextForSegmentPart(PatientStudyEligibilityStatus, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(StudyRandomizationDatetime, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(StudyRandomizedArm, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(StratumforStudyRandomization, options));
			segmentParts.Add(GetER7TextForSegmentPart(PatientEvaluabilityStatus, options));
			segmentParts.Add(GetER7TextForSegmentPart(DateTimeEndedStudy, options));
			segmentParts.Add(GetER7TextForSegmentPart(ReasonEndedStudy, options));
			return string.Join("" + options.FieldSep, segmentParts.ToArray());
		}

    }
}

